package com.itheima01;

public class PrintableDemo {
    public static void main(String[] args) {
        usePrintable(s -> System.out.println(s));

        // 方法引用符号："::"
        usePrintable(System.out::println);
    }

    private static void usePrintable(Printable p) {
        p.printString("爱生活，爱Java");
    }
}
